package com.cgy.utils.base.tuple;

import com.cgy.utils.base.tuple.value.IValue0;
import com.cgy.utils.base.tuple.value.IValue1;
import com.cgy.utils.base.tuple.value.IValue2;
import com.cgy.utils.base.tuple.value.IValue3;

/**
 * 三元组
 *
 * @author CHTK
 */
public class Quaternary<A, B, C, D> extends Tuple implements IValue0<A>, IValue1<B>, IValue2<C>, IValue3<D> {

    /**
	 * 
	 */
	private static final long serialVersionUID = 8848700113721989911L;
	private final A val0;
    private final B val1;
    private final C val2;
    private final D val3;

    public Quaternary(final A value0, final B value1, final C value2, final D value3) {
        super(value0, value1, value2);
        this.val0 = value0;
        this.val1 = value1;
        this.val2 = value2;
        this.val3 = value3;
    }

    public static <A, B, C, D> Quaternary<A, B, C, D> with(final A value0, final B value1, final C value2, final D value3) {
        return new Quaternary<A, B, C, D>(value0, value1, value2, value3);
    }

    @Override
    public int getSize() {
        return 0;
    }

    @Override
    public A getValue0() {
        return this.val0;
    }

    @Override
    public B getValue1() {
        return this.val1;
    }

    @Override
    public C getValue2() {
        return this.val2;
    }

    @Override
    public D getValue3() {
        return this.val3;
    }
}
